import { defineStore } from 'pinia';

export const useAuthStore = defineStore('auth', {
    state: () => ({
        permissions: [],
    }),
    actions: {
        setPermissions(permissions) {
            this.permissions = permissions;
        },
        hasPermission(permission) {
            return this.permissions.includes(permission);
        },
    },
});